package lab02.test31;

import java.util.AbstractList;
import java.util.ArrayList;
import java.util.List;

/**
 * Created by 阿阿阿阿豪丶 on 2017/11/3.
 */
public class Test {
    public static void main(String[] args) {


        //集合
        //数组：三个整数，五个学生，十个手机..
        int[] numbers = new int[3];
        numbers[0] = 12;
        numbers[1] = 14;
        numbers[2] = 19;

        //集合：List,Map,Set
        //Integer：包装类型，int

        List<String> name = new ArrayList<String>();
        name.add("张三");
        name.add("李四");
        name.add("王五");
        name.add("马六");
        name.add("赵七");


        for (String m : name){
            System.out.println(m + (name.indexOf(m)+1));
        }
        System.out.println("集合大小"+name.size());
        name.remove(2);

        System.out.println("第三个元素" + name.get(2));
        System.out.println("集合大小" + name.size());

        /*List<Integer> alist = new ArrayList<Integer>();
        alist.add(1);
        alist.add(2);
        alist.add(3);


        List<Integer> numberList = new ArrayList<Integer>();
        numberList.add(10);
        numberList.add(18);
        numberList.add(12);
        numberList.add(19);
        numberList.add(129);
        numberList.add(139);
        numberList.remove(3);
        numberList.addAll(alist);

        for (Integer n:numberList){
            System.out.println(n);
        }*/


    }
}
